#pragma once

#include <memory>
#include "rtda/heap/cp_symref.h"
#include "classfile/constant_info.hpp"
#include "classfile/class_file.hpp"

namespace jvm {
namespace heap {

class MemberRef : public SymRef {
protected:
    std::string m_name;
    std::string m_descriptor;

public:
    MemberRef(std::shared_ptr<ConstantPool> pCp = nullptr);
    void copyMemberRefInfo(const std::shared_ptr<classfile::ConstantMemberRefInfo> pRefInfo);
    
    const std::string& getName() const;
    const std::string& getDescriptor() const;
};

} // namespace heap
} // namespace jvm
